#TARGET = spidrv.ko


LINUXKERNEL_INSTALL_DIR=/home/mango/dm368/kernel/kernel_source
obj-m += spi_drv.o
spi_drv-objs:= vcap_buf.o spidrv.o

EXTRA_CFLAGS +=	-DUSE_UDEV=$(USE_UDEV) 		\
				-DMAX_POOLS=$(MAX_POOLS)

MAKE_ENV = ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

debug: EXTRA_CFLAGS += -D__DEBUG

.PHONY: clean all install default

default: all

docs:

all:
	make -C $(LINUXKERNEL_INSTALL_DIR) M=`pwd` $(MAKE_ENV) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules

clean:
	-rm -rf *.o *mod* *.ko .FPGA* .tmp* .*.ko.cmd .*.mod.o.cmd .*.o.cmd Module.symvers


